<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="d" uri="/WEB-INF/resource.tld" %>

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>
  
</head>

<body>

  <%@ include file="/WEB-INF/include/header.jsp"%>
  <%@ include file="/WEB-INF/include/menu.jsp"%>
  
  <div class="container main-content">
  
    <div class="panel panel-default x-panel x-panel-layout">
    
      <div class="panel-heading">
        <ol class="breadcrumb">
          <li><a href="${ctx.host }/user">用户管理</a></li>
          <li class="active">明星代言人</li>
        </ol>
      </div>
      
      <div class="panel-body">
      
        <div class="col-xs-2 x-panel-layout-left no-horizontal-padding">
          <%@ include file="/WEB-INF/include/submenu.jsp"%>
        </div>
        
        <div class="col-xs-10 x-panel-layout-right">
        
          <div class="x-breadcrumb-wrapper">
            <div class="x-breadcrumb clearfix">
              <h2><i class="glyphicon glyphicon-fire"></i>&nbsp;&nbsp;<span>明星代言人&nbsp;-&nbsp;明星代言人详情</span></h2>
            </div>
          </div>
          
          <div class="x-breadcrumb-wrapper ">
         
            <div class="x-breadcrumb-wrapper">
              <ul class="nav nav-pills x-breadcrumb-nav ajax-tab" data-content="#info-content" data-operation="#distributor-operation">
                <li class="pull-left active">
                  <a id="info" href="${ctx.host}/distributors/${distributor.id}/info" data-toggle="tab" data-target="#distributor-info">基本信息</a>
                </li>       
                <li class="pull-left">
                  <a id="withdrawal" href="${ctx.host}/distributors/${distributor.id}/distribution-records" data-toggle="tab" data-target="#distributor-withdrawal">提现信息</a>
                </li>
              </ul>
            </div>
            
            <div id="distributor-operation" class="tab-operation pull-right">
              <div id="info-operation" class="tab-operations hide">
                <a href="${ctx.host}/distributors/${distributor.id}/edit-info" data-target="#info-edit" data-toggle="modal" title="编辑">编辑基本信息</a>
              </div>
            </div>
            
            <div id="info-content" class="tab-content ajax-tab-content">
              <div class="tab-pane fade active in" id="distributor-info" style="min-height: 100px;">
                <div class="form-horizontal">
                  <div class="form-group">
                    <label class="control-label col-xs-2">姓名：</label>
                    <div class="col-xs-4 pull-left">
                      <p class="form-control-static">${distributor.name}</p>
                    </div>
                    <label class="control-label col-xs-2">手机号：</label>
                    <div class="col-xs-4 pull-left">
                      <p class="form-control-static">${distributor.mobile}</p>
                    </div>
                  </div>
                  
                  <div class="form-group">
                    <label class="control-label col-xs-2">代言人折扣：</label>
                    <div class="col-xs-4 pull-left">
                      <p class="form-control-static">${distributor.kickback}%</p>
                    </div>
                  </div>
                  <div class="form-group">
                    <label class="control-label col-xs-2">结算账号：</label>
                    <c:if test="${not empty distributor.webchatId}">
                      <div class="col-xs-4 pull-left">
                        <p class="form-control-static">微信号：${distributor.webchatId}</p>
                      </div>
                    </c:if>
                    <c:if test="${not empty distributor.account}">
                      <div class="col-xs-4 pull-left">
                        <p class="form-control-static">支付宝：${distributor.account}，真实姓名：${distributor.realName}</p>
                      </div>
                    </c:if>
                  </div>
                </div>
              </div>
            </div>
            
           <div class="x-breadcrumb-wrapper">
             <ul class="nav nav-pills x-breadcrumb-nav ajax-tab" data-content="#order-content" data-operation="#order-operations">
                 <li class="pull-left">
                   <a id="order" href="${ctx.host}/distributors/${distributor.id}/order" data-toggle="tab" data-target="#agent-order">用户购买记录</a>
                 </li>
             </ul>
             
           </div>
           
           <div id="order-content" class="tab-content ajax-tab-content">
           </div>
           
         </div>
        </div>
      </div>
    </div>
  </div>

<%@ include file="/WEB-INF/include/script.jsp"%>
 <d:resource root="${ctx.resource}/build" type="script" src="js/page/user/distributor-view.js">
    <script type="text/javascript">
      require(['page/user/distributor-view'], function(page) {
        page.init()
      })
    </script>
  </d:resource>
  
</body>

</html>